
extension MapExtension on Map {
  double doubleValue(String key,{double defaultVal=0}){
    Object val = this[key];
    return val != null?double.tryParse("$val"):defaultVal;
  }

  int intValue(String key,{int defaultVal=0}){
    Object val = this[key];
    return val != null?int.tryParse("$val"):defaultVal;
  }

  String strValue(String key,{String defaultVal=""}){
    Object val = this[key];
    return val != null?"$val":defaultVal;
  }

  bool boolValue(String key,{bool defaultVal = false}){

    Object val = this[key];
    return val != null?val:defaultVal;
  }
}